package com.young.springdemo.service.adapter;

public class CatAndDogAdapter implements DogController,CatController {

    private Dog dog;
    private Cat cat;

    public CatAndDogAdapter() {
        dog =new Dog();
        cat = new Cat();
    }

    @Override
    public void catchM() {
        dog.cry();
    }

    @Override
    public void cry() {
        cat.catchMouse();
    }
}
